<template>
	<view>
		<uni-search-bar @confirm="search" v-model="searchVal" placeholder="搜索商品"></uni-search-bar>
		<view class="uni-padding-wrap">
			<view class="page-section swiper">
				<view class="page-section-spacing">
					<swiper class="swiper" :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval"
						:duration="duration">
						<swiper-item>
							<image src="../../static/img/lunbo1.png"></image>
						</swiper-item>
						<swiper-item>
							<image src="../../static/img/lunbo2.jpg"></image>
						</swiper-item>
						<swiper-item>
							<image src="../../static/img/lunbo3.png"></image>
						</swiper-item>
					</swiper>
				</view>
			</view>
		</view>
		<!-- <view style="margin-left: 30rpx;"><uni-tag text="每日新品" inverted type="warning" size="normal"></uni-tag></view> -->
		<!-- 内容通栏 -->
		<uni-card is-full="true" :title="DCloud"
			:thumbnail="tuiguang"
			:extra="currTime">
			<image :src="newShop" style="width: 100%;" @click="clickNewShop"></image>
		</uni-card>
		
	</view>
</template>

<script>
	export default {
		components: {

		},
		data() {
			return {
				indicatorDots: true,
				autoplay: true,
				interval: 2000,
				duration: 500,
				searchVal: '',
				DCloud: '每日新品',
				tuiguang:require("@/static/icon/tuiguang.png"),/* 小喇叭图标，无需修改 */
				newShop:require("@/static/img/tea.png"),/* 每日新品下的图片，推荐大小406x293 */
				currShop:{
					name:'青澹汝窑茶具套装盖碗套装三才茶具茶杯',
					imgSrc:[require("@/static/img/tea.png"),require("@/static/img/tea2.png")],
					id:3,
					weight:0.2,
					assess:'暂无评价'
				},
			}
		},
		onLoad() {
			
		},
		methods: {
			search() {
				// console.log("点击搜索" + this.searchVal)
			},
			clickNewShop(){/* 点击 每日新品 下的图片 */
				uni.navigateTo({
					url:"../shop/shopContent?id="+this.currShop.id,
					success() {
						
					},
				})
			},
		},
		computed: {
			currTime() {
				let date = new Date()
				let year = date.getFullYear();
				let month = date.getMonth() + 1; //注意月份加一，否则不正确
				let day = date.getDate();
				let hour = date.getHours();
				let min = date.getMinutes();
				let sec = date.getSeconds();
				return year + "." + month + "." + day ;
			},
		},
	}
</script>

<style>

</style>
